package com.whoiszxl.cqrs.command;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 仓储管理员收供应商的货的接口的命令
 *
 * @author whoiszxl
 * @date 2022/3/18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonIgnoreProperties(ignoreUnknown = true)
@Schema(description = "仓储管理员收供应商的货的接口的命令")
public class ReceiveProductCommand {
    @Schema(description = "到货时间")
    private LocalDateTime arrivalTime;

    @Schema(description = "接收货物item条目集合")
    private List<ReceiveItem> receiveItems;

    @Data
    @Schema(description = "接收货物item条目")
    public static class ReceiveItem {

        @Schema(description = "主键")
        private Long id;

        @Schema(description = "合格的商品数量")
        private Integer qualifiedCount;

        @Schema(description = "到货的商品数量")
        private Integer arrivalCount;
    }
}
